package com.group.pojo;

import java.util.ArrayList;
import java.util.List;

public class TbBasedataExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TbBasedataExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(String value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(String value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(String value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(String value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(String value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(String value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(String value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(String value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<String> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<String> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(String value1, String value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(String value1, String value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdIsNull() {
            addCriterion("level1_id is null");
            return (Criteria) this;
        }

        public Criteria andLevel1IdIsNotNull() {
            addCriterion("level1_id is not null");
            return (Criteria) this;
        }

        public Criteria andLevel1IdEqualTo(Integer value) {
            addCriterion("level1_id =", value, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdNotEqualTo(Integer value) {
            addCriterion("level1_id <>", value, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdGreaterThan(Integer value) {
            addCriterion("level1_id >", value, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdGreaterThanOrEqualTo(Integer value) {
            addCriterion("level1_id >=", value, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdLessThan(Integer value) {
            addCriterion("level1_id <", value, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdLessThanOrEqualTo(Integer value) {
            addCriterion("level1_id <=", value, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdIn(List<Integer> values) {
            addCriterion("level1_id in", values, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdNotIn(List<Integer> values) {
            addCriterion("level1_id not in", values, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdBetween(Integer value1, Integer value2) {
            addCriterion("level1_id between", value1, value2, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1IdNotBetween(Integer value1, Integer value2) {
            addCriterion("level1_id not between", value1, value2, "level1Id");
            return (Criteria) this;
        }

        public Criteria andLevel1NameIsNull() {
            addCriterion("level1_name is null");
            return (Criteria) this;
        }

        public Criteria andLevel1NameIsNotNull() {
            addCriterion("level1_name is not null");
            return (Criteria) this;
        }

        public Criteria andLevel1NameEqualTo(String value) {
            addCriterion("level1_name =", value, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameNotEqualTo(String value) {
            addCriterion("level1_name <>", value, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameGreaterThan(String value) {
            addCriterion("level1_name >", value, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameGreaterThanOrEqualTo(String value) {
            addCriterion("level1_name >=", value, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameLessThan(String value) {
            addCriterion("level1_name <", value, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameLessThanOrEqualTo(String value) {
            addCriterion("level1_name <=", value, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameLike(String value) {
            addCriterion("level1_name like", value, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameNotLike(String value) {
            addCriterion("level1_name not like", value, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameIn(List<String> values) {
            addCriterion("level1_name in", values, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameNotIn(List<String> values) {
            addCriterion("level1_name not in", values, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameBetween(String value1, String value2) {
            addCriterion("level1_name between", value1, value2, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel1NameNotBetween(String value1, String value2) {
            addCriterion("level1_name not between", value1, value2, "level1Name");
            return (Criteria) this;
        }

        public Criteria andLevel2IdIsNull() {
            addCriterion("level2_id is null");
            return (Criteria) this;
        }

        public Criteria andLevel2IdIsNotNull() {
            addCriterion("level2_id is not null");
            return (Criteria) this;
        }

        public Criteria andLevel2IdEqualTo(Integer value) {
            addCriterion("level2_id =", value, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdNotEqualTo(Integer value) {
            addCriterion("level2_id <>", value, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdGreaterThan(Integer value) {
            addCriterion("level2_id >", value, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdGreaterThanOrEqualTo(Integer value) {
            addCriterion("level2_id >=", value, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdLessThan(Integer value) {
            addCriterion("level2_id <", value, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdLessThanOrEqualTo(Integer value) {
            addCriterion("level2_id <=", value, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdIn(List<Integer> values) {
            addCriterion("level2_id in", values, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdNotIn(List<Integer> values) {
            addCriterion("level2_id not in", values, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdBetween(Integer value1, Integer value2) {
            addCriterion("level2_id between", value1, value2, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2IdNotBetween(Integer value1, Integer value2) {
            addCriterion("level2_id not between", value1, value2, "level2Id");
            return (Criteria) this;
        }

        public Criteria andLevel2NameIsNull() {
            addCriterion("level2_name is null");
            return (Criteria) this;
        }

        public Criteria andLevel2NameIsNotNull() {
            addCriterion("level2_name is not null");
            return (Criteria) this;
        }

        public Criteria andLevel2NameEqualTo(String value) {
            addCriterion("level2_name =", value, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameNotEqualTo(String value) {
            addCriterion("level2_name <>", value, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameGreaterThan(String value) {
            addCriterion("level2_name >", value, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameGreaterThanOrEqualTo(String value) {
            addCriterion("level2_name >=", value, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameLessThan(String value) {
            addCriterion("level2_name <", value, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameLessThanOrEqualTo(String value) {
            addCriterion("level2_name <=", value, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameLike(String value) {
            addCriterion("level2_name like", value, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameNotLike(String value) {
            addCriterion("level2_name not like", value, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameIn(List<String> values) {
            addCriterion("level2_name in", values, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameNotIn(List<String> values) {
            addCriterion("level2_name not in", values, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameBetween(String value1, String value2) {
            addCriterion("level2_name between", value1, value2, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2NameNotBetween(String value1, String value2) {
            addCriterion("level2_name not between", value1, value2, "level2Name");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueIsNull() {
            addCriterion("level2_value is null");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueIsNotNull() {
            addCriterion("level2_value is not null");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueEqualTo(String value) {
            addCriterion("level2_value =", value, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueNotEqualTo(String value) {
            addCriterion("level2_value <>", value, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueGreaterThan(String value) {
            addCriterion("level2_value >", value, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueGreaterThanOrEqualTo(String value) {
            addCriterion("level2_value >=", value, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueLessThan(String value) {
            addCriterion("level2_value <", value, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueLessThanOrEqualTo(String value) {
            addCriterion("level2_value <=", value, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueLike(String value) {
            addCriterion("level2_value like", value, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueNotLike(String value) {
            addCriterion("level2_value not like", value, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueIn(List<String> values) {
            addCriterion("level2_value in", values, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueNotIn(List<String> values) {
            addCriterion("level2_value not in", values, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueBetween(String value1, String value2) {
            addCriterion("level2_value between", value1, value2, "level2Value");
            return (Criteria) this;
        }

        public Criteria andLevel2ValueNotBetween(String value1, String value2) {
            addCriterion("level2_value not between", value1, value2, "level2Value");
            return (Criteria) this;
        }

        public Criteria andDataStatusIsNull() {
            addCriterion("data_status is null");
            return (Criteria) this;
        }

        public Criteria andDataStatusIsNotNull() {
            addCriterion("data_status is not null");
            return (Criteria) this;
        }

        public Criteria andDataStatusEqualTo(String value) {
            addCriterion("data_status =", value, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusNotEqualTo(String value) {
            addCriterion("data_status <>", value, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusGreaterThan(String value) {
            addCriterion("data_status >", value, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusGreaterThanOrEqualTo(String value) {
            addCriterion("data_status >=", value, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusLessThan(String value) {
            addCriterion("data_status <", value, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusLessThanOrEqualTo(String value) {
            addCriterion("data_status <=", value, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusLike(String value) {
            addCriterion("data_status like", value, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusNotLike(String value) {
            addCriterion("data_status not like", value, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusIn(List<String> values) {
            addCriterion("data_status in", values, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusNotIn(List<String> values) {
            addCriterion("data_status not in", values, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusBetween(String value1, String value2) {
            addCriterion("data_status between", value1, value2, "dataStatus");
            return (Criteria) this;
        }

        public Criteria andDataStatusNotBetween(String value1, String value2) {
            addCriterion("data_status not between", value1, value2, "dataStatus");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}